<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>layout 后台大布局 - Layui</title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/plugin/layui/css/layui.css">
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">

    <jsp:include page="../module/top.jsp"></jsp:include>

    <jsp:include page="../module/left.jsp"></jsp:include>


    <div class="layui-body">
        <a href="${pageContext.request.contextPath}/blogbanner/go_blogbanner_saveorupdate.html?id=" style="margin: 10px 20px;float: right" class="layui-btn">创建banner</a>
        <!-- 内容主体区域 -->
        <div style="padding: 15px;" id="content_div">

        </div>
    </div>
    <jsp:include page="../module/bottom.jsp"></jsp:include>
</div>
<script src="${pageContext.request.contextPath}/static/js/jquery-2.1.1.min.js"></script>
<script src="${pageContext.request.contextPath}/static/plugin/layui/layui.all.js"></script>
<script type="text/javascript">
    var element = layui.element;

    $(function () {//页面加载完成执行
        var limit = 10;
        load_page(1, limit);
    });



    function load_page(page, limit) {
        $.ajax({
            url: '${pageContext.request.contextPath}/blogbanner/blog_banner_list_data',
            type: 'post',
            dataType: 'html',
            data: {'page': page, "limit": limit},
            async: false,
            success: function (result) {
                $("#content_div").html("");
                $("#content_div").append(result);
            },
            error: function () {
                alert("异常！");
            }
        });
    }

</script>
</body>
</html>